com.github.droidfu.support
Class ArraySupport
java.lang.Object
com.github.droidfu.support.ArraySupport
public class ArraySupport
- extends Object
Method Summary |
static
|
delete(T[] array,
int index)
|
static
|
find(T[] array,
T object)
Attempts to find an object in a potentially unsorted array. |
static
|
join(T[] head,
T[] tail)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArraySupport
public ArraySupport()
join
public static <T> T[] join(T[] head,
T[] tail)
delete
public static <T> T[] delete(T[] array,
int index)
find
public static <T> int find(T[] array,
T object)
- Attempts to find an object in a potentially unsorted array. Complexity is
O(N).
- Type Parameters:
T
- - Parameters:
array
- the input arrayobject
- the object to find
- Returns:
- the index of the object if found, -1 otherwise.
Copyright © 2011. All Rights Reserved.